package com.blog.yihao.common.shiro;

import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Component;

/**
 * 
 * @author WANGCONG
 * 2020年10月16日上午10:05:55
 * @desc js调用 thymeleaf 实现按钮权限
 */
@Component("perms")
public class PermsService {
    public boolean hasPerm(String permission) {
        return SecurityUtils.getSubject().isPermitted(permission);
    }
}
